package com.piggy.logi.sys.api.factory;

import com.piggy.common.core.web.page.TableDataInfo;
import com.piggy.logi.sys.api.bo.LogiSysDeptExtCusEditBo;
import com.piggy.logi.sys.api.domain.LogiSysDept;
import com.piggy.logi.sys.api.RemoteLogiDeptService;
import com.piggy.common.core.domain.R;
import com.piggy.logi.sys.api.vo.LogiSysDeptExtVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 用户服务降级处理98
 *
 * @author shark
 */
@Component
public class RemoteLogiDeptFallbackFactory implements FallbackFactory<RemoteLogiDeptService> {
    private static final Logger log = LoggerFactory.getLogger(RemoteLogiDeptFallbackFactory.class);

    @Override
    public RemoteLogiDeptService create(Throwable throwable) {
        log.error("部门服务调用失败:{}", throwable.getMessage());

        return new RemoteLogiDeptService()
        {

            @Override
            public Long getOrgDeptId(Long deptId, String source) {
                return null;
            }

            @Override
            public R<LogiSysDeptExtVo> getById(Long deptId, String source) {
                return null;
            }

            @Override
            public R<LogiSysDeptExtVo> getInfo(Long deptId, String source) {
                return null;
            }

            @Override
            public R<List<LogiSysDeptExtVo>> queryDeptAll(String source) {
                return null;
            }

            @Override
            public R<LogiSysDeptExtVo> saveSysDept(LogiSysDept logiSysDept, String source) {
                return null;
            }

            @Override
            public R<LogiSysDeptExtVo> detailInfo(Long deptId, String source) {
                return null;
            }

            @Override
            public R<LogiSysDeptExtVo> bossAdd(LogiSysDeptExtCusEditBo dept1, String source) {
                return null;
            }

            @Override
            public R<LogiSysDeptExtVo> bossEdit(LogiSysDeptExtCusEditBo dept1, String source) {
                return null;
            }

            @Override
            public TableDataInfo<LogiSysDeptExtVo> rootList(LogiSysDept dept, String source) {
                return null;
            }

            @Override
            public R removeRoot(Long deptId, String source) {
                return null;
            }
        };
    }
}
